<template>
  <div>
    <el-form-item label="按钮名称：">
      <el-input v-model.trim="modalFormData.buttonName"></el-input>
    </el-form-item>
    <el-form-item label="按钮功能：">
      <el-radio-group v-model="modalFormData.ability">
        <el-radio label="submit">提交</el-radio>
        <el-radio label="reset">重置</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="按钮类型：">
      <el-select v-model="modalFormData.buttonType">
        <el-option
          v-for="item in buttonTypeList"
          :key="item.value"
          :value="item.value"
          :label="item.label"
        ></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="按钮尺寸：">
      <el-select v-model="modalFormData.buttonSize">
        <el-option
          v-for="item in buttonSizeList"
          :key="item.value"
          :value="item.value"
          :label="item.label"
        ></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="上边距：">
      <el-input-number v-model="modalFormData.marginTop"></el-input-number>&nbsp;&nbsp;px
    </el-form-item>
    <el-form-item label="下边距：">
      <el-input-number v-model="modalFormData.marginBottom"></el-input-number>&nbsp;&nbsp;px
    </el-form-item>
    <el-form-item label="左边距：">
      <el-input-number v-model="modalFormData.marginLeft"></el-input-number>&nbsp;&nbsp;px
    </el-form-item>
    <el-form-item label="右边距：">
      <el-input-number v-model="modalFormData.marginRight"></el-input-number>&nbsp;&nbsp;px
    </el-form-item>
    <el-form-item label="行内元素：">
      <el-checkbox v-model="modalFormData.inlineBlock">是</el-checkbox>
    </el-form-item>
  </div>
</template>
<script>
import { buttonTypeList,buttonSizeList } from "../config/buttonList";
export default {
  name: "ButtonConfig",
  props: {
    modalFormData: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  data(){
    return {
      buttonTypeList,
      buttonSizeList,
    }
  }
};
</script>